<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <div th:fragment="staticTemplate">
        <div id="static_template_box">
            <div id="static_template_top_part">
                    <form class="form-inline">
                        <th:block th:if="${editTemplateVO!=null}">
                            <input type="hidden" id="static_template_id" th:value="${editTemplateVO.id}"/>
                        </th:block>
                        <div class="form-group">
                            <label for="static_template_name">模板名称</label>
                            <input th:value="${editTemplateVO!=null?editTemplateVO.name:''}" type="text" class="form-control" id="static_template_name" />
                        </div>
                        <div class="form-group">
                            <label for="static_template_course">关联课程</label>
                            <th:block th:if="${editTemplateVO!=null}">
                                <select class="form-control" id="static_template_course" >
                                    <option th:text="${editTemplateVO.yuliu1}" th:value="${editTemplateVO.yuliu1}"></option>
                                </select>
                            </th:block>
                            <th:block th:if="${editTemplateVO==null}">
                                <select class="form-control" id="static_template_course" >
                                    <option>==请选择==</option>
                                    <option  th:each="course:${allCourse}" th:value="${course}" th:text="${course}"></option>
                                </select>
                            </th:block>
                        </div>
                        <div id="static_template_top_button_group">
                            <button onclick="template.static.cancelSave()" type="button" class="btn btn-primary"><span class="glyphicon glyphicon-remove"></span>取消</button>
                            <button onclick="template.static.templateSave()" type="button" class="btn btn-primary"><span class="glyphicon glyphicon-save"></span>保存</button>
                        </div>
                    </form>
            </div>
            <div style="height: 700px" id="static_template_right_part">
                <div id="static_template_total_score">
                    <span>总分：</span> <span>0分</span>
                </div>
                <hr />
                <div id="static_template_question1">
                    <div id="static_template_question1_content">
                        <p>单选题</p>
                        <span class="param_input_group">
                            <span>每题</span>
                            <input onchange="template.static.changeScore()" style="width: 60px" type="number" id="static_template_question1_score" th:value="${editTemplateVO!=null?editTemplateVO.question1_score:2}"/>
                            <span>分</span>
                            <span class="param">
                                <span>0题</span><span>0分</span>
                            </span>
                        </span>
                    </div>
                </div>
                <hr />
                <div id="static_template_question2">
                    <div id="static_template_question2_content">
                        <p>多选题</p>
                        <span class="param_input_group">
                            <span>每题</span>
                            <input onchange="template.static.changeScore()" style="width: 60px" type="number" id="static_template_question2_score" th:value="${editTemplateVO!=null?editTemplateVO.question2_score:2}"/>
                            <span>分</span>
                            <span class="param">
                                <span>0题</span><span>0分</span>
                            </span>
                        </span>
                    </div>
                </div>
                <hr />
                <div id="static_template_question3">
                    <div id="static_template_question3_content">
                        <p>判断题</p>
                        <span class="param_input_group">
                            <span>每题</span>
                            <input onchange="template.static.changeScore()" style="width: 60px" type="number" id="static_template_question3_score" th:value="${editTemplateVO!=null?editTemplateVO.question3_score:2}"/>
                            <span>分</span>
                            <span class="param">
                                <span>0题</span><span>0分</span>
                            </span>
                        </span>
                    </div>
                </div>
                <hr />
                <div id="static_template_question4">
                    <div id="static_template_question4_content">
                        <p>填空题</p>
                        <span class="param_input_group">
                            <span>每空</span>
                            <input onchange="template.static.changeScore()" style="width: 60px" type="number" id="static_template_question4_score" th:value="${editTemplateVO!=null?editTemplateVO.question4_score:2}"/>
                            <span>分</span>
                            <span class="param">
                                <span>0题</span><span>0空</span><span>0分</span>
                            </span>
                        </span>
                    </div>
                </div>
                <hr />
                <div id="static_template_question5">
                    <div id="static_template_question5_content">
                        <p>综合题</p>
                        <span class="param_input_group">
                            <span>每题</span>
                            <input onchange="template.static.changeScore()" style="width: 60px" type="number" id="static_template_question5_score" th:value="${editTemplateVO!=null?editTemplateVO.question5_score:2}"/>
                            <span>分</span>
                            <span class="param">
                                <span>0题</span><span>0分</span>
                            </span>
                        </span>
                    </div>
                </div>
                <hr />
            </div>
            <div id="static_template_left_part">
                <div id="static_template_left_head_box">
                    <div style="float: right;padding-top: 10px" id="static_template_head_button_group">
                        <button onclick="template.static.importQuestion()" class="btn btn-primary glyphicon glyphicon-open">导入试题</button>
                        <button onclick="template.static.addQuestion()" class=" btn btn-primary glyphicon glyphicon glyphicon-plus">添加试题</button>
                    </div>
                    <div id="static_template_head_edit_group">
                        <span><input onclick="template.static.selectAllQuestion(this)" type="checkbox"/><span>全选</span></span>
                        <span><a href="javascript:void(0)" onclick="template.static.deleteMoreQuestion()" class="glyphicon glyphicon-trash">删除</a></span>
                    </div>
                    <hr/>
                </div>
                <div id="static_template_left_content_box">
                    <th:block th:if="${currentQuestions!=null && currentQuestions.size()>0}">
                        <div  id="static_template_left_content_box_inner_content" th:include="template/staticTemplateQuestions::staticTemplateQuestionList"></div>
                    </th:block>
                    <div id="static_template_left_bottom_button_group">
                        <button onclick="template.static.importQuestion()" class="btn btn-primary glyphicon glyphicon-open">导入试题</button>
                        <button onclick="template.static.addQuestion()" class=" btn btn-primary glyphicon glyphicon glyphicon-plus">添加试题</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</html>